struct ListNode* ReverseList(struct ListNode* pHead)
{
    struct ListNode* cur = pHead;
    struct ListNode* pre = NULL;
    while (cur != NULL)
    {
        struct ListNode* temp = cur->next;
        cur->next = pre;
        pre = cur;
        cur = temp;
    }

    return pre;
    // write code here
}